package com.wyp.design.pattern.structural.bridge;

/**
 * 测试类
 *
 * @author: Oliver
 * @time: 2020/5/17/11:40
 */
public class Test {
    public static void main(String[] args) {
        Bank icbcBank = new ICBCBank(new DepositAccount());
        Account account = icbcBank.openAccount();
        account.showAccountType();

        Bank icbcBank1 = new ICBCBank(new SavingAccount());
        Account account1 = icbcBank1.openAccount();
        account1.showAccountType();

        Bank ibcBank2 = new IBCBank(new SavingAccount());
        Account account2 = ibcBank2.openAccount();
        account2.showAccountType();

        Bank ibcBank3 = new IBCBank(new DepositAccount());
        Account account3 = ibcBank3.openAccount();
        account3.showAccountType();

    }
}
